<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMerchantMedicineSpuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchant_medicine_spu', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('自增id');
            $table->bigInteger('merchant_medicine_id')->default(0)->comment('药品id');
            $table->string('spu_name')->nullable()->comment('属性名');
            $table->string('specification')->nullable()->comment('规格');
            $table->decimal('price')->default(0)->comment('商品价格');
            $table->integer('stock')->default(0)->comment('商品库存');
            $table->integer('sort')->default(0)->comment('排序');
            $table->integer('status')->default(0)->comment('状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('merchant_medicine_spu');
    }
}
